extends "../tianying-1/tianying-1.gd"

func _extInit():
	._extInit()
	lv = 2
	addSkill("每{cd}秒对当前目标直线上的所有敌人造成[四维之和*0.8]的可暴击技能伤害", "领航之箭", "tianying2", 10)

func _castCdSkill(id):
	._castCdSkill(id)
	if id=="tianying2":
		tianying2()

func tianying2():
	var eff:Eff = newEff("sk_feiZhan",sprcPos)
	eff._initFlyPos(position + (aiCha.position - position).normalized() * 1000, 800)
	eff.connect("onInCell",self,"effInCell")
var p2 = 1
func effInCell(cell):
	var cha = matCha(cell)
	if cha == null:
		cha = matCha(cell + Vector2(0, 1))
	if cha != null && cha.team != team:
		azurHurtChara(cha, att.atk+att.mgiAtk+att.def+att.air, sys.HurtType.WEAPON, sys.AtkType.SKILL, "领航之箭", true, p2)